package org.example.azapi.util;

import org.example.azapi.AzEntity;
import org.example.azapi.constants.AzCategoryId;

//import org.example.azapi.test.TestAzRequestContext;
import org.example.azapi.test.TestAzEntity;

/**
 * @author Rich
 *
 */
public class AzEntityFactory {
	
	static int idAzEntityCounter = 0;
	
	public static <T extends Enum<T> & AzCategoryId> 
	AzEntity<T> getAzEntity(T t){
		//AzEntity<T> azEntity = TestAzRequestContext.createAzEntity(t);
		AzEntity<T> azEntity = new TestAzEntity<T>(t, idAzEntityCounter++);
		return azEntity;
	}
	//public static <>

	public static <T> 
	T getMiddle(T[] a){
		T aReturn = a[a.length/2];
		return aReturn;
	}
}
